#!/sbin/openrc-run
# Copyright 2011-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

description="TLP start/stop actions"

depend() {
	after modules

	# sysfs is required (bat thresholds); localmount:/usr
	need sysfs localmount

	after NetworkManager dbus bluetooth

	# run after xdm to avoid bluetooth/wwan/... race-condition with gdm
	after xdm
}

start()   { /usr/sbin/tlp init start; }
stop()    { /usr/sbin/tlp init stop; }
restart() { /usr/sbin/tlp init restart; }
